import { createApp } from 'vue'
import App from './App.vue'

// 生态相关
import router from './router'
import pinia from '@/pinia/store'


// element-plus
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import az from 'element-plus/lib/locale/lang/zh-cn'


// 插件
import DataVVue3 from '@kjgl77/datav-vue3'
import 'default-passive-events'
import print from 'vue3-print-nb'


// 样式
import 'element-plus/dist/index.css'
import './style.css'
import '@/common/index.scss'

//图标
import '@/assets/icon/iconfont'
import AnimatedNumber from 'animated-number-vue3'
// 全局指令
import directive from '@/directive'

// 全局组件
import component from '@/components/index'


// 页面自动调节大小
import '@/utils/rem'

// 引入方法
import { $formatechartData } from '@/utils/globalMethod'


const app = createApp(App)
app.use(AnimatedNumber)


az.el.pagination = {
    total: `{total}条数据`,
    pagesize: '条/页',
}





app.config.globalProperties.$formatechartData = $formatechartData




app.use(DataVVue3)
app.use(pinia)
app.use(router)
app.use(ElementPlus, { locale: az })

app.use(component)

app.use(directive)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}


app.mount('#app')
